//
//  TeamProfile.h
//  playSerengetiMobile1
//
//  Created by Lita Gratrix on 12/11/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "User.h"
#import "Team.h"
#import "playSerengetiMobile1AppDelegate.h"

@interface TeamProfile : UIViewController <UITableViewDataSource, UITableViewDelegate> {
	NSInteger teamId;
	
	UILabel *teamNameLabel;
	UILabel *homeBaseLabel;
	UILabel *teamLeaderLabel;
	UITableView *teamProfileTableView;
	
	NSURLConnection *teamProfileConnection;
	NSURLConnection *teamLeaderConnection;
	NSMutableData *responseDataForTeamProfileConnection;
	NSMutableData *responseDataForTeamLeaderConnection;
	
	Team *profile;
	NSMutableArray *members;
	
	NSMutableArray *tableSourceArray;
	
	playSerengetiMobile1AppDelegate *appDelegate;
	
}

@property (nonatomic, readwrite) NSInteger teamId;

@property (nonatomic, retain) IBOutlet UILabel *teamNameLabel;
@property (nonatomic, retain) IBOutlet UILabel *homeBaseLabel;
@property (nonatomic, retain) IBOutlet UILabel *teamLeaderLabel;
@property (nonatomic, retain) IBOutlet UITableView *teamProfileTableView;

@property (nonatomic, retain) Team *profile;
@property (nonatomic, retain) NSMutableArray *members;

@property (nonatomic, retain) NSMutableArray *tableSourceArray;

@property (nonatomic, retain) playSerengetiMobile1AppDelegate *appDelegate;

- (void)populateViewData:(NSDictionary *)parsedData;
- (void)getTeamLeaderData: (NSInteger)teamOwnerId;
- (void)populateTeamLeader:(NSDictionary *)parsedData;
- (void)populateMembers:(NSMutableArray *)memberArray;


@end
